package com.community.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sun.org.apache.xpath.internal.objects.XString;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author TangHaoSong Fly ChenJie HeYuHang
 * @since 2024-05-15
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Consumer implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 前台用户id，主键，自增
     */
    @TableId(value = "consumer_id", type = IdType.AUTO)
    private Integer consumerId;

    /**
     * 昵称
     */
    @TableField(value = "nick_name", insertStrategy = FieldStrategy.DEFAULT)
    private String nickName;

    /**
     * 登录帐号
     */
    private String loginName;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 帐户余额
     */
    private Double balance;

    /**
     * 头像
     */
    private String avatarImg;

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 性别
     */
    private String sex;

    /**
     * 生日
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date birth;

    /**
     * 个人介绍
     */
    private String introduce;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /**
     * 是否是商户
     */
    private String merchantTag;

    /**
     * 是否是供货商
     */
    private String supplierTag;

    /**
     * 是否删除
     */
    private String status;


}
